<?php

namespace App\Observers;

use App\Models\Comment;
use Illuminate\Support\Facades\Log;

class CommentObserver
{
	public function saving(Comment $comment)
	{
		$comment->content = strip_tags(clean($comment->content, 'default'));
	}
	
	public function saved(Comment $comment)
	{
		$comment->addToCache();
	}
	
	public function deleted(Comment $comment)
	{
		$comment->delFromCache();
	}
}
